﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Streamsol.Crm.XrmDevelopmentToolkit
{
    [global::System.AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
    public sealed class XrmReferenceTypeAttribute : Attribute
    {
        // See the attribute guidelines at 
        //  http://go.microsoft.com/fwlink/?LinkId=85236
        readonly string entityTypeName;
        private bool allowEmpty;

        // This is a positional argument
        public XrmReferenceTypeAttribute(string entityTypeName)
        {
            this.entityTypeName = entityTypeName;
            this.allowEmpty = true;
        }

        public string EntityTypeName
        {
            get { return entityTypeName; }
        }

        public bool AllowEmptyValue
        {
            get { return allowEmpty; }
            set { allowEmpty = value; }
        }
    }
}
